<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>寻ta千百度-信息发布</title>
        <script type="text/javascript" src="js/jquery-3.3.0.js" ></script>
        <script type="text/javascript" src="js/My97DatePicker/WdatePicker.js"></script>
		<link type="text/css" rel="stylesheet" href="css/xunwu.css"/>
		<link rel="stylesheet" href="/css/mystyle.css" />
		<link type="text/css" rel="stylesheet" href="/css/constant.css"/>
		<script src="https://eqcn.ajz.miesnfu.com/wp-content/plugins/wp-3d-pony/live2dw/lib/L2Dwidget.min.js"></script>
		<script>
			L2Dwidget.init({
				"model": {
					//jsonpath控制显示那个小萝莉模型，
					//(切换模型需要改动)
//				"https://unpkg.com/(live2d-widget-model-koharu)@1.0.5/assets/(koharu).model.json"
					jsonPath: "https://unpkg.com/live2d-widget-model-koharu@1.0.5/assets/koharu.model.json",
					"scale": 1
				},
				"display": {
					"position": "right", //看板娘的表现位置
					"width": 150,  //小萝莉的宽度
					"height": 300, //小萝莉的高度
					"hOffset": 0,
					"vOffset": -20
				},
				"mobile": {
					"show": true,
					"scale": 0.5
				},
				"react": {
					"opacityDefault": 0.7,
					"opacityOnHover": 0.2
				}
			});
		</script>
		<style>
			.error{
				color: red;
			}
			.kong{
				height: 10px;
			}
			.current{
            	background-color: cornflowerblue;
            }
		</style>
	</head>
	<body>
		<div id="settled"></div>
		<div id="content">
			<div style="width: 100%; height: 30px; border-bottom: #DEDEDE 2px solid; background: url(img/span_bg.bmp) repeat-x;">
				<img src="img/未标题-1.png" style="width: 20px;height: 20px;margin-top: 5px;float: left;"/>
				<span style="font-weight: 100;font-size: 16px;color:#1E7ACE; line-height: 30px;">发布窗口</span>
			</div>
			<div>
				<table class="form" cellpadding="0" cellspacing="0" style="width: 100%;">
				    <tr class="kong"></tr>
				    <tr>
				      <td align="right" style="width: 100px;">信息类型&nbsp;&nbsp;</td>
				      <td colspan="3" class="type">
				      	<button class="current" data-id="xunwu">寻物启事</button>&nbsp;&nbsp;
				      	<button data-id="xunchong">寻宠启事</button>&nbsp;&nbsp;
				      	<button data-id="xunren">寻人启事</button>&nbsp;&nbsp;
				      	<button data-id="zhaoling">招领启事</button>&nbsp;&nbsp;

				      </td>
				    </tr>
				</table>
				<div id="change"></div>
			</div>
		</div>
        <input type="hidden" id="hidden" value="${key}">
		<div id="footer">
			<div style="margin:0 auto;display: block;width: 500px">
				<h1 style="color:#4d8bbc; margin-bottom:10px;margin-left: 50px">Convenient&nbsp;<span style="color:#999">Yourself</span></h1>
				<p style="color:#999;margin-left: 80px">每一个失物的背后，都是一颗急切的心！</p><br>
				<p style="color:#999;margin-left:100px">创建美好社会，文明你我他！</p>
				<br />
				<p style="color:#999;margin-left: 80px" >Copyright &copy;2020&nbsp;&nbsp;邮政编码：334700</p><br />
			</div>
		</div>
        <script>
            //引入头部固定的样式
            $("#settled").load("/loadConstant");
            $(function() {
                var key=$("#hidden").val();
                if(key!=null&&key=="lostor"){
                    window.location.hash = "zhaoling";
                    loadInner("zhaoling");
                }else {
                	loadInner("xunwu");
				}
                $(".type").on("click", "button", function() {
                    var sId = $(this).data("id"); //获取data-id的值
                    window.location.hash = sId; //设置锚点
                    loadInner(sId);
                });

                function loadInner(sId) {
                    var sId = window.location.hash;
                    var pathn, i;
                    switch(sId) {
                        case "#xunwu":
                            pathn = "/findGoods";
                            i = 1;
                            break;
                        case "#xunchong":
                            pathn = "/findPet";
                            i = 2;
                            break;
                        case "#xunren":
                            pathn = "/findShe";
                            i = 3;
                            break;
                        case "#zhaoling":
                            pathn = "/findLostor";
                            i = 4;
                            break;
                        default:
                            pathn = "/findGoods";
                            i = 1;
                            break;
                    }
                    $("#change").load(pathn); //加载相对应的内容
                    $(".type button").eq(i-1).addClass("current").siblings().removeClass("current"); //当前列表高亮

                }

                $("body").on("click","#randomcodeimg",function(){
                    document.getElementById("randomcodeimg").src="/randomcode?t="+new Date().getTime();
                });
            });
        </script>
	</body>

</html>
